home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1847 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.4 KB

  1. Path: info.curtin.edu.au!newsmaster
  2. From: escott@cuppa.curtin.edu.au
  3. Newsgroups: comp.lang.c++
  4. Subject: Beginner questions (TC++ 3.0)
  5. Date: Sat, 13 Jan 96 17:20:14 +800
  6. Organization: Curtin University
  7. Message-ID: <4d7tgq$hf@info.curtin.edu.au>
  8. NNTP-Posting-Host: vax7.curtin.edu.au
  9.  
  10. I'm in the process of converting from Pascal to C/C++, and dont as yet have any
  11. reference material other than the Turbo C++ 3.0 manual. My first project is to
  12. convert all my Pascal unit files into C++ library files. I've converted the
  13. code across successfully for most of my routines (which are mainly inline
  14. assembler in any case), but I'm having trouble getting Turbo C++ to recognise
  15. my compiled files. I can compile the file to a *.lib file by using the
  16. Options|Applications menu, however, I am not certain as to the process of
  17. getting the compiler to recognise the files existance.
  18.  
  19. At present to utilise the routines I have to have a #include stuff.cpp for the
  20. file, instead of being able to refer to the header file. I believe, but have
  21. been unable to accertain, that I may have to include in the header some
  22. reference that allows the compiler to identify the .lib file. Some of the
  23. included text files also indicate that I must include the header and source
  24. files in certain directories, and contain other strange directives that I
  25. cannot make any sense of. 
  26.  
  27. The point of all this is that I would like a clear, plain english description
  28. of how to go about creating library files, as the manual and other
  29. documentation are somewhat unclear on this process.
  30.  
  31. I am also trying to read binary files into memory. Having been somewhat
  32. unsuccessful with C++ commands, I have decided to use Dos function calls. I am
  33. using the dos library at present. What I wish to know is:
  34.  
  35. a) Can the handle obtained form the dos.h open command be used directly with
  36. dos function calls.
  37.  
  38. b) Will the file be automatically closed if opened within a procedure, when
  39. that procedure goes out of scope. This is important in that I will be opening
  40. far more files than it is practical to have file handles. If the file does not
  41. get close automatically, is it better to use an inline assembler function call,
  42. a library function, or does it not matter.
  43.  
  44. As a final question, could anyone in Perth, Australia steer me in the direction
  45. of a good source for C++ reference books.
  46.  
  47. Thanks in advance for anyone with the patience to get this far
  48. Colin Scott
  49.